/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.me.cine25;

import android.app.Activity;
import android.graphics.Bitmap;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import java.util.LinkedList;

/**
 *
 * @author Jesus
 */
public class Top25Adapter extends BaseAdapter {

    private Activity c;
    private LinkedList<Bitmap> list;

    public Top25Adapter(Activity context, LinkedList<Bitmap> list) {
        this.c = context;
        this.list = list;
    }

    public int getCount() {
        return this.list.size();
    }

    public Object getItem(int arg0) {
        return arg0;
    }

    public long getItemId(int arg0) {
        return arg0;
    }

    public View getView(int arg0, View arg1, ViewGroup arg2) {
        LayoutInflater inflater = c.getLayoutInflater();
        View item = null;
        item = inflater.inflate(R.layout.top25element, null);
        ImageView a = (ImageView) item.findViewById(R.id.Image);
        a.setImageBitmap(list.get(arg0));
        
        ((ImageView) item.findViewById(R.id.Image1)).setImageResource(R.drawable.ic_delete);
        ((ImageView) item.findViewById(R.id.Image2)).setImageResource(R.drawable.ic_delete);
        ((ImageView) item.findViewById(R.id.Image3)).setImageResource(R.drawable.ic_delete);


        return item;
    }
}
